package com.tarena.lbs.business.dao.repository;

import com.github.pagehelper.PageInfo;
import com.tarena.lbs.base.protocol.exception.BusinessException;
import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.business.pojo.po.BusinessPO;
import com.tarena.lbs.business.pojo.query.BusinessQuery;
import org.springframework.stereotype.Repository;

@Repository
public interface BusinessRepository {

    //根据ID获取商家信息
    BusinessPO getById(Integer businessId);
    //保存商家信息
    void save(BusinessPO businessPO);
    //分页查询商家列表
    PageInfo<BusinessPO> pagesList(BusinessQuery query);

    // 新增方法：检查公司地址是否存在
    boolean existsByCompanyAddress(String companyAddress);
    // 新增方法：审核商家
    void updateBusiness(BusinessPO po);
    // 新增方法：获取商家信息 通过ID
    BusinessPO getBusinessById(Integer id);
    boolean existsByBusinessName(String businessName);
}

